package com.service.impl;

import com.bean.User;
import com.dao.UserDao;
import com.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    UserDao userDao;

    @Override
    public List<User> queryUserList() {
        return userDao.queryUserList();
    }

    @Override
    public void deleteUserById(int id) {
        userDao.deleteUserById(id);
    }

    @Override
    public void backToUser(int id, String username, String question, String contact, String address, Date date) {
        userDao.backToUser(id, username, question, contact, address, date);
    }

    @Override
    public int addUser(User user) {
        return userDao.addUser(user);

    }

    @Override
    public void addUserInLocal(String username, String question, String contact, String address, Date date) {
        userDao.addUserInLocal(username, question, contact, address, date);
    }
}
